const mongoose = require("mongoose");

const RecordSchema = new mongoose.Schema({
	userId: { type: String },
	dateTime: {
		type: String,
		required: [true, "请录入时间"],
	},
	income: {
		type: String,
		required: [true, "请录入输赢值"],
	},
	type: {
		type: String,
		required: [true, "请选择类型"],
	},
	isWin: { type: Boolean, default: true },
});

module.exports = mongoose.model("Record", RecordSchema);
